home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_Text / DrawingViewWraps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  23.7 KB  |  732 lines

  1. /* DrawingViewWraps.c generated from DrawingViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawingViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42.  *    DrawingViewWraps.psw
  43.  *
  44.  *
  45.  *    Version:    2.0
  46.  *    Author:    Ken Fromm
  47.  *    History:
  48.  *            03-07-91        Added this comment.
  49.  */
  50. #line 51 "DrawingViewWraps.c"
  51. void PSWMarkTime( void )
  52. {
  53.   typedef struct {
  54.     unsigned char tokenType;
  55.     unsigned char topLevelCount;
  56.     unsigned short nBytes;
  57.  
  58.     DPSBinObjGeneric obj0;
  59.     DPSBinObjGeneric obj1;
  60.     DPSBinObjGeneric obj2;
  61.     } _dpsQ;
  62.   static const _dpsQ _dpsStat = {
  63.     DPS_DEF_TOKENTYPE, 3, 28,
  64.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* StartTime */
  65.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  66.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  67.     }; /* _dpsQ */
  68.   _dpsQ _dpsF;    /* local copy  */
  69.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  70.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  71.   static long int _dpsCodes[1] = {-1};
  72.   {
  73. if (_dpsCodes[0] < 0) {
  74.     static const char * const _dps_names[] = {
  75.     "StartTime"};
  76.     long int *_dps_nameVals[1];
  77.     _dps_nameVals[0] = &_dpsCodes[0];
  78.  
  79.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  80.     }
  81.   }
  82.  
  83.   _dpsF = _dpsStat;    /* assign automatic variable */
  84.  
  85.   _dpsP[0].val.nameVal = _dpsCodes[0];
  86.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  87. }
  88. #line 45 "DrawingViewWraps.psw"
  89.  
  90. #line 91 "DrawingViewWraps.c"
  91. void PSWReturnTime(int *ElapsedTime)
  92. {
  93.   typedef struct {
  94.     unsigned char tokenType;
  95.     unsigned char topLevelCount;
  96.     unsigned short nBytes;
  97.  
  98.     DPSBinObjGeneric obj0;
  99.     DPSBinObjGeneric obj1;
  100.     DPSBinObjGeneric obj2;
  101.     DPSBinObjGeneric obj3;
  102.     DPSBinObjGeneric obj4;
  103.     DPSBinObjGeneric obj5;
  104.     DPSBinObjGeneric obj6;
  105.     DPSBinObjGeneric obj7;
  106.     DPSBinObjGeneric obj8;
  107.     } _dpsQ;
  108.   static const _dpsQ _dpsStat = {
  109.     DPS_DEF_TOKENTYPE, 9, 76,
  110.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  111.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* StartTime */
  112.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  113.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  114.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  115.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  116.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  118.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  119.     }; /* _dpsQ */
  120.   _dpsQ _dpsF;    /* local copy  */
  121.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  122.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  123.   static long int _dpsCodes[1] = {-1};
  124.   DPSResultsRec _dpsR[1];
  125.   static const DPSResultsRec _dpsRstat[] = {
  126.     { dps_tInt, -1 },
  127.     };
  128.     _dpsR[0] = _dpsRstat[0];
  129.     _dpsR[0].value = (char *)ElapsedTime;
  130.  
  131.   {
  132. if (_dpsCodes[0] < 0) {
  133.     static const char * const _dps_names[] = {
  134.     "StartTime"};
  135.     long int *_dps_nameVals[1];
  136.     _dps_nameVals[0] = &_dpsCodes[0];
  137.  
  138.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  139.     }
  140.   }
  141.  
  142.   _dpsF = _dpsStat;    /* assign automatic variable */
  143.  
  144.   _dpsP[1].val.nameVal = _dpsCodes[0];
  145.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  146.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  147.   DPSAwaitReturnValues(_dpsCurCtxt);
  148. }
  149. #line 50 "DrawingViewWraps.psw"
  150.  
  151. #line 152 "DrawingViewWraps.c"
  152. void PSWCachestatus(int Array[])
  153. {
  154.   typedef struct {
  155.     unsigned char tokenType;
  156.     unsigned char topLevelCount;
  157.     unsigned short nBytes;
  158.  
  159.     DPSBinObjGeneric obj0;
  160.     DPSBinObjGeneric obj1;
  161.     DPSBinObjGeneric obj2;
  162.     DPSBinObjGeneric obj3;
  163.     DPSBinObjGeneric obj4;
  164.     DPSBinObjGeneric obj5;
  165.     DPSBinObjGeneric obj6;
  166.     DPSBinObjGeneric obj7;
  167.     DPSBinObjGeneric obj8;
  168.     DPSBinObjGeneric obj9;
  169.     DPSBinObjGeneric obj10;
  170.     DPSBinObjGeneric obj11;
  171.     DPSBinObjGeneric obj12;
  172.     DPSBinObjGeneric obj13;
  173.     DPSBinObjGeneric obj14;
  174.     DPSBinObjGeneric obj15;
  175.     DPSBinObjGeneric obj16;
  176.     } _dpsQ;
  177.   static const _dpsQ _dpsF = {
  178.     DPS_DEF_TOKENTYPE, 13, 140,
  179.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 265},    /* cachestatus */
  180.     {DPS_LITERAL|DPS_INT, 0, 0, 7},
  181.     {DPS_LITERAL|DPS_INT, 0, 0, -1},
  182.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  183.     {DPS_EXEC|DPS_ARRAY, 0, 2, 120},
  184.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  185.     {DPS_LITERAL|DPS_INT, 0, 0, 7},
  186.     {DPS_EXEC|DPS_ARRAY, 0, 2, 104},
  187.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 131},    /* repeat */
  188.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  189.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  190.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  191.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  192.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  193.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  194.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  195.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135},    /* roll */
  196.     }; /* _dpsQ */
  197.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  198.   DPSResultsRec _dpsR[1];
  199.   static const DPSResultsRec _dpsRstat[] = {
  200.     { dps_tInt },
  201.     };
  202.     _dpsR[0] = _dpsRstat[0];
  203.     _dpsR[0].count = 7;
  204.     _dpsR[0].value = (char *)Array;
  205.  
  206.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  207.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,140);
  208.   DPSAwaitReturnValues(_dpsCurCtxt);
  209. }
  210. #line 54 "DrawingViewWraps.psw"
  211.  
  212. #line 213 "DrawingViewWraps.c"
  213. void PSWCurrentcacheparams(int *Size, int *Lower, int *Upper)
  214. {
  215.   typedef struct {
  216.     unsigned char tokenType;
  217.     unsigned char topLevelCount;
  218.     unsigned short nBytes;
  219.  
  220.     DPSBinObjGeneric obj0;
  221.     DPSBinObjGeneric obj1;
  222.     DPSBinObjGeneric obj2;
  223.     DPSBinObjGeneric obj3;
  224.     DPSBinObjGeneric obj4;
  225.     DPSBinObjGeneric obj5;
  226.     DPSBinObjGeneric obj6;
  227.     DPSBinObjGeneric obj7;
  228.     DPSBinObjGeneric obj8;
  229.     DPSBinObjGeneric obj9;
  230.     DPSBinObjGeneric obj10;
  231.     } _dpsQ;
  232.   static const _dpsQ _dpsF = {
  233.     DPS_DEF_TOKENTYPE, 11, 92,
  234.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 275},    /* currentcacheparams */
  235.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  236.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  237.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  238.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  239.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  240.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  241.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  242.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  243.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  244.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  245.     }; /* _dpsQ */
  246.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  247.   DPSResultsRec _dpsR[3];
  248.   static const DPSResultsRec _dpsRstat[] = {
  249.     { dps_tInt, -1 },
  250.     { dps_tInt, -1 },
  251.     { dps_tInt, -1 },
  252.     };
  253.     _dpsR[0] = _dpsRstat[0];
  254.     _dpsR[0].value = (char *)Size;
  255.     _dpsR[1] = _dpsRstat[1];
  256.     _dpsR[1].value = (char *)Lower;
  257.     _dpsR[2] = _dpsRstat[2];
  258.     _dpsR[2].value = (char *)Upper;
  259.  
  260.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 3);
  261.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,92);
  262.   DPSAwaitReturnValues(_dpsCurCtxt);
  263. }
  264. #line 58 "DrawingViewWraps.psw"
  265.  
  266. #line 267 "DrawingViewWraps.c"
  267. void PSWSetcacheparams(int Size, int Lower, int Upper)
  268. {
  269.   typedef struct {
  270.     unsigned char tokenType;
  271.     unsigned char topLevelCount;
  272.     unsigned short nBytes;
  273.  
  274.     DPSBinObjGeneric obj0;
  275.     DPSBinObjGeneric obj1;
  276.     DPSBinObjGeneric obj2;
  277.     DPSBinObjGeneric obj3;
  278.     DPSBinObjGeneric obj4;
  279.     } _dpsQ;
  280.   static const _dpsQ _dpsStat = {
  281.     DPS_DEF_TOKENTYPE, 5, 44,
  282.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 318},    /* mark */
  283.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: Size */
  284.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: Lower */
  285.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: Upper */
  286.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 339},    /* setcacheparams */
  287.     }; /* _dpsQ */
  288.   _dpsQ _dpsF;    /* local copy  */
  289.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  290.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  291.   _dpsF = _dpsStat;    /* assign automatic variable */
  292.  
  293.   _dpsP[1].val.integerVal = Size;
  294.   _dpsP[2].val.integerVal = Lower;
  295.   _dpsP[3].val.integerVal = Upper;
  296.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  297. }
  298. #line 62 "DrawingViewWraps.psw"
  299.  
  300. #line 301 "DrawingViewWraps.c"
  301. void PSWRmovetoShow(float X, char Str[], int Num)
  302. {
  303.   typedef struct {
  304.     unsigned char tokenType;
  305.     unsigned char topLevelCount;
  306.     unsigned short nBytes;
  307.  
  308.     DPSBinObjReal obj0;
  309.     DPSBinObjGeneric obj1;
  310.     DPSBinObjGeneric obj2;
  311.     DPSBinObjGeneric obj3;
  312.     DPSBinObjGeneric obj4;
  313.     } _dpsQ;
  314.   static const _dpsQ _dpsStat = {
  315.     DPS_DEF_TOKENTYPE, 5, 44,
  316.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  317.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  318.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 134},    /* rmoveto */
  319.     {DPS_LITERAL|DPS_STRING, 0, 0, 40},    /* param Str */
  320.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},    /* show */
  321.     }; /* _dpsQ */
  322.   _dpsQ _dpsF;    /* local copy  */
  323.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  324.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  325.   register int _dps_offset = 40;
  326.   _dpsF = _dpsStat;    /* assign automatic variable */
  327.  
  328.   _dpsP[0].val.realVal = X;
  329.   _dpsP[3].length = Num;
  330.   _dpsP[3].val.stringVal = _dps_offset;
  331.   _dps_offset += (Num + 3) & ~3;
  332.  
  333.   _dpsF.nBytes = _dps_offset+4;
  334.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  335.   DPSWriteStringChars(_dpsCurCtxt, (char *)Str, Num);
  336.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Num + 3) & 3);
  337. }
  338. #line 66 "DrawingViewWraps.psw"
  339.  
  340. #line 341 "DrawingViewWraps.c"
  341. void PSWShow(char Str[], int Num)
  342. {
  343.   typedef struct {
  344.     unsigned char tokenType;
  345.     unsigned char topLevelCount;
  346.     unsigned short nBytes;
  347.  
  348.     DPSBinObjGeneric obj0;
  349.     DPSBinObjGeneric obj1;
  350.     } _dpsQ;
  351.   static const _dpsQ _dpsStat = {
  352.     DPS_DEF_TOKENTYPE, 2, 20,
  353.     {DPS_LITERAL|DPS_STRING, 0, 0, 16},    /* param Str */
  354.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},    /* show */
  355.     }; /* _dpsQ */
  356.   _dpsQ _dpsF;    /* local copy  */
  357.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  358.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  359.   register int _dps_offset = 16;
  360.   _dpsF = _dpsStat;    /* assign automatic variable */
  361.  
  362.   _dpsP[0].length = Num;
  363.   _dpsP[0].val.stringVal = _dps_offset;
  364.   _dps_offset += (Num + 3) & ~3;
  365.  
  366.   _dpsF.nBytes = _dps_offset+4;
  367.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,20);
  368.   DPSWriteStringChars(_dpsCurCtxt, (char *)Str, Num);
  369.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Num + 3) & 3);
  370. }
  371. #line 70 "DrawingViewWraps.psw"
  372.  
  373. #line 374 "DrawingViewWraps.c"
  374. void PSWAshow(float X, float Y, char Str[], int Num)
  375. {
  376.   typedef struct {
  377.     unsigned char tokenType;
  378.     unsigned char topLevelCount;
  379.     unsigned short nBytes;
  380.  
  381.     DPSBinObjReal obj0;
  382.     DPSBinObjReal obj1;
  383.     DPSBinObjGeneric obj2;
  384.     DPSBinObjGeneric obj3;
  385.     } _dpsQ;
  386.   static const _dpsQ _dpsStat = {
  387.     DPS_DEF_TOKENTYPE, 4, 36,
  388.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  389.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  390.     {DPS_LITERAL|DPS_STRING, 0, 0, 32},    /* param Str */
  391.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 10},    /* ashow */
  392.     }; /* _dpsQ */
  393.   _dpsQ _dpsF;    /* local copy  */
  394.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  395.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  396.   register int _dps_offset = 32;
  397.   _dpsF = _dpsStat;    /* assign automatic variable */
  398.  
  399.   _dpsP[0].val.realVal = X;
  400.   _dpsP[1].val.realVal = Y;
  401.   _dpsP[2].length = Num;
  402.   _dpsP[2].val.stringVal = _dps_offset;
  403.   _dps_offset += (Num + 3) & ~3;
  404.  
  405.   _dpsF.nBytes = _dps_offset+4;
  406.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,36);
  407.   DPSWriteStringChars(_dpsCurCtxt, (char *)Str, Num);
  408.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Num + 3) & 3);
  409. }
  410. #line 74 "DrawingViewWraps.psw"
  411.  
  412. #line 413 "DrawingViewWraps.c"
  413. void PSWWidthshow(float X, float Y, int C, char Str[], int Num)
  414. {
  415.   typedef struct {
  416.     unsigned char tokenType;
  417.     unsigned char topLevelCount;
  418.     unsigned short nBytes;
  419.  
  420.     DPSBinObjReal obj0;
  421.     DPSBinObjReal obj1;
  422.     DPSBinObjGeneric obj2;
  423.     DPSBinObjGeneric obj3;
  424.     DPSBinObjGeneric obj4;
  425.     } _dpsQ;
  426.   static const _dpsQ _dpsStat = {
  427.     DPS_DEF_TOKENTYPE, 5, 44,
  428.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  429.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  430.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: C */
  431.     {DPS_LITERAL|DPS_STRING, 0, 0, 40},    /* param Str */
  432.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 187},    /* widthshow */
  433.     }; /* _dpsQ */
  434.   _dpsQ _dpsF;    /* local copy  */
  435.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  436.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  437.   register int _dps_offset = 40;
  438.   _dpsF = _dpsStat;    /* assign automatic variable */
  439.  
  440.   _dpsP[0].val.realVal = X;
  441.   _dpsP[1].val.realVal = Y;
  442.   _dpsP[2].val.integerVal = C;
  443.   _dpsP[3].length = Num;
  444.   _dpsP[3].val.stringVal = _dps_offset;
  445.   _dps_offset += (Num + 3) & ~3;
  446.  
  447.   _dpsF.nBytes = _dps_offset+4;
  448.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  449.   DPSWriteStringChars(_dpsCurCtxt, (char *)Str, Num);
  450.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Num + 3) & 3);
  451. }
  452. #line 78 "DrawingViewWraps.psw"
  453.  
  454. #line 455 "DrawingViewWraps.c"
  455. void PSWAwidthshow(float X, float Y, int C, float AX, float AY, char Str[], int Num)
  456. {
  457.   typedef struct {
  458.     unsigned char tokenType;
  459.     unsigned char topLevelCount;
  460.     unsigned short nBytes;
  461.  
  462.     DPSBinObjReal obj0;
  463.     DPSBinObjReal obj1;
  464.     DPSBinObjGeneric obj2;
  465.     DPSBinObjReal obj3;
  466.     DPSBinObjReal obj4;
  467.     DPSBinObjGeneric obj5;
  468.     DPSBinObjGeneric obj6;
  469.     } _dpsQ;
  470.   static const _dpsQ _dpsStat = {
  471.     DPS_DEF_TOKENTYPE, 7, 60,
  472.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  473.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  474.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: C */
  475.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: AX */
  476.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: AY */
  477.     {DPS_LITERAL|DPS_STRING, 0, 0, 56},    /* param Str */
  478.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 12},    /* awidthshow */
  479.     }; /* _dpsQ */
  480.   _dpsQ _dpsF;    /* local copy  */
  481.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  482.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  483.   register int _dps_offset = 56;
  484.   _dpsF = _dpsStat;    /* assign automatic variable */
  485.  
  486.   _dpsP[0].val.realVal = X;
  487.   _dpsP[1].val.realVal = Y;
  488.   _dpsP[2].val.integerVal = C;
  489.   _dpsP[3].val.realVal = AX;
  490.   _dpsP[4].val.realVal = AY;
  491.   _dpsP[5].length = Num;
  492.   _dpsP[5].val.stringVal = _dps_offset;
  493.   _dps_offset += (Num + 3) & ~3;
  494.  
  495.   _dpsF.nBytes = _dps_offset+4;
  496.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,60);
  497.   DPSWriteStringChars(_dpsCurCtxt, (char *)Str, Num);
  498.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Num + 3) & 3);
  499. }
  500. #line 82 "DrawingViewWraps.psw"
  501.  
  502.  
  503. /*
  504. *    Reencode the font, add BitmapWidths, ExactSize, InBetweenSize and
  505. *    TransformedChar entries set to 0 to force the use of outline fonts at all times.
  506. */
  507. #line 508 "DrawingViewWraps.c"
  508. void PSWCopyFont(char *F1, char *F2)
  509. {
  510.   typedef struct {
  511.     unsigned char tokenType;
  512.     unsigned char sizeFlag;
  513.     unsigned short topLevelCount;
  514.     unsigned long nBytes;
  515.  
  516.     DPSBinObjGeneric obj0;
  517.     DPSBinObjGeneric obj1;
  518.     DPSBinObjGeneric obj2;
  519.     DPSBinObjGeneric obj3;
  520.     DPSBinObjGeneric obj4;
  521.     DPSBinObjGeneric obj5;
  522.     DPSBinObjGeneric obj6;
  523.     DPSBinObjGeneric obj7;
  524.     DPSBinObjGeneric obj8;
  525.     DPSBinObjGeneric obj9;
  526.     DPSBinObjGeneric obj10;
  527.     DPSBinObjGeneric obj11;
  528.     DPSBinObjGeneric obj12;
  529.     DPSBinObjGeneric obj13;
  530.     DPSBinObjGeneric obj14;
  531.     DPSBinObjGeneric obj15;
  532.     DPSBinObjGeneric obj16;
  533.     DPSBinObjGeneric obj17;
  534.     DPSBinObjGeneric obj18;
  535.     DPSBinObjGeneric obj19;
  536.     DPSBinObjGeneric obj20;
  537.     DPSBinObjGeneric obj21;
  538.     DPSBinObjGeneric obj22;
  539.     DPSBinObjGeneric obj23;
  540.     DPSBinObjGeneric obj24;
  541.     DPSBinObjGeneric obj25;
  542.     DPSBinObjGeneric obj26;
  543.     DPSBinObjGeneric obj27;
  544.     DPSBinObjGeneric obj28;
  545.     DPSBinObjGeneric obj29;
  546.     DPSBinObjGeneric obj30;
  547.     DPSBinObjGeneric obj31;
  548.     DPSBinObjGeneric obj32;
  549.     DPSBinObjGeneric obj33;
  550.     DPSBinObjGeneric obj34;
  551.     DPSBinObjGeneric obj35;
  552.     DPSBinObjGeneric obj36;
  553.     DPSBinObjGeneric obj37;
  554.     DPSBinObjGeneric obj38;
  555.     DPSBinObjGeneric obj39;
  556.     DPSBinObjGeneric obj40;
  557.     DPSBinObjGeneric obj41;
  558.     DPSBinObjGeneric obj42;
  559.     DPSBinObjGeneric obj43;
  560.     DPSBinObjGeneric obj44;
  561.     DPSBinObjGeneric obj45;
  562.     DPSBinObjGeneric obj46;
  563.     DPSBinObjGeneric obj47;
  564.     } _dpsQ;
  565.   static const _dpsQ _dpsStat = {
  566.     DPS_DEF_TOKENTYPE, 0, 33, 392,
  567.     {DPS_LITERAL|DPS_NAME, 0, 0, 384},    /* param F1 */
  568.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67},    /* findfont */
  569.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  570.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 13},    /* begin */
  571.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  572.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 98},    /* length */
  573.     {DPS_LITERAL|DPS_INT, 0, 0, 4},
  574.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1},    /* add */
  575.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 53},    /* dict */
  576.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 13},    /* begin */
  577.     {DPS_EXEC|DPS_ARRAY, 0, 12, 264},
  578.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 73},    /* forall */
  579.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FontName */
  580.     {DPS_LITERAL|DPS_NAME, 0, 0, 384},    /* param F2 */
  581.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  582.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BitmapWidths */
  583.     {DPS_LITERAL|DPS_BOOL, 0, 0, 0},
  584.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  585.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* ExactSize */
  586.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  587.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  588.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* InBetweenSize */
  589.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  590.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  591.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* TransformedChar */
  592.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  593.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  594.     {DPS_LITERAL|DPS_NAME, 0, 0, 384},    /* param F2 */
  595.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 30},    /* currentdict */
  596.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 290},    /* definefont */
  597.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  598.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 57},    /* end */
  599.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 57},    /* end */
  600.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  601.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  602.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* FID */
  603.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 109},    /* ne */
  604.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  605.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  606.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* UniqueID */
  607.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 109},    /* ne */
  608.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 4},    /* and */
  609.     {DPS_EXEC|DPS_ARRAY, 0, 1, 376},
  610.     {DPS_EXEC|DPS_ARRAY, 0, 2, 360},
  611.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 85},    /* ifelse */
  612.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  613.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  614.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  615.     }; /* _dpsQ */
  616.   _dpsQ _dpsF;    /* local copy  */
  617.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  618.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  619.   static long int _dpsCodes[7] = {-1};
  620.   register int _dps_offset = 384;
  621.   {
  622. if (_dpsCodes[0] < 0) {
  623.     static const char * const _dps_names[] = {
  624.     "FontName",
  625.     "BitmapWidths",
  626.     "ExactSize",
  627.     "InBetweenSize",
  628.     "TransformedChar",
  629.     "FID",
  630.     "UniqueID"};
  631.     long int *_dps_nameVals[7];
  632.     _dps_nameVals[0] = &_dpsCodes[0];
  633.     _dps_nameVals[1] = &_dpsCodes[1];
  634.     _dps_nameVals[2] = &_dpsCodes[2];
  635.     _dps_nameVals[3] = &_dpsCodes[3];
  636.     _dps_nameVals[4] = &_dpsCodes[4];
  637.     _dps_nameVals[5] = &_dpsCodes[5];
  638.     _dps_nameVals[6] = &_dpsCodes[6];
  639.  
  640.     DPSMapNames(_dpsCurCtxt, 7, _dps_names, _dps_nameVals);
  641.     }
  642.   }
  643.  
  644.   _dpsF = _dpsStat;    /* assign automatic variable */
  645.  
  646.   _dpsP[0].length = strlen(F1);
  647.   _dpsP[13].length =
  648.   _dpsP[27].length = strlen(F2);
  649.   _dpsP[12].val.nameVal = _dpsCodes[0];
  650.   _dpsP[15].val.nameVal = _dpsCodes[1];
  651.   _dpsP[18].val.nameVal = _dpsCodes[2];
  652.   _dpsP[21].val.nameVal = _dpsCodes[3];
  653.   _dpsP[24].val.nameVal = _dpsCodes[4];
  654.   _dpsP[35].val.nameVal = _dpsCodes[5];
  655.   _dpsP[39].val.nameVal = _dpsCodes[6];
  656.   _dpsP[27].val.stringVal = _dps_offset;
  657.   _dps_offset += (_dpsP[27].length + 3) & ~3;
  658.   _dpsP[13].val.stringVal = _dps_offset;
  659.   _dps_offset += (_dpsP[13].length + 3) & ~3;
  660.   _dpsP[0].val.stringVal = _dps_offset;
  661.   _dps_offset += (_dpsP[0].length + 3) & ~3;
  662.  
  663.   _dpsF.nBytes = _dps_offset+8;
  664.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,392);
  665.   DPSWriteStringChars(_dpsCurCtxt, (char *)F2, _dpsP[27].length);
  666.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[27].length + 3) & 3);
  667.   DPSWriteStringChars(_dpsCurCtxt, (char *)F2, _dpsP[13].length);
  668.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[13].length + 3) & 3);
  669.   DPSWriteStringChars(_dpsCurCtxt, (char *)F1, _dpsP[0].length);
  670.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[0].length + 3) & 3);
  671. }
  672. #line 106 "DrawingViewWraps.psw"
  673.  
  674. #line 675 "DrawingViewWraps.c"
  675. void PSWSetFont(char *Name, float Size)
  676. {
  677.   typedef struct {
  678.     unsigned char tokenType;
  679.     unsigned char sizeFlag;
  680.     unsigned short topLevelCount;
  681.     unsigned long nBytes;
  682.  
  683.     DPSBinObjGeneric obj0;
  684.     DPSBinObjGeneric obj1;
  685.     DPSBinObjGeneric obj2;
  686.     DPSBinObjReal obj3;
  687.     DPSBinObjGeneric obj4;
  688.     DPSBinObjGeneric obj5;
  689.     DPSBinObjReal obj6;
  690.     DPSBinObjGeneric obj7;
  691.     DPSBinObjGeneric obj8;
  692.     DPSBinObjGeneric obj9;
  693.     DPSBinObjGeneric obj10;
  694.     DPSBinObjGeneric obj11;
  695.     DPSBinObjGeneric obj12;
  696.     } _dpsQ;
  697.   static const _dpsQ _dpsStat = {
  698.     DPS_DEF_TOKENTYPE, 0, 13, 112,
  699.     {DPS_LITERAL|DPS_NAME, 0, 0, 104},    /* param Name */
  700.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67},    /* findfont */
  701.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 260},    /* [ */
  702.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Size */
  703.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  704.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  705.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Size */
  706.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 110},    /* neg */
  707.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  708.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  709.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 261},    /* ] */
  710.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 103},    /* makefont */
  711.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 149},    /* setfont */
  712.     }; /* _dpsQ */
  713.   _dpsQ _dpsF;    /* local copy  */
  714.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  715.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  716.   register int _dps_offset = 104;
  717.   _dpsF = _dpsStat;    /* assign automatic variable */
  718.  
  719.   _dpsP[0].length = strlen(Name);
  720.   _dpsP[3].val.realVal =
  721.   _dpsP[6].val.realVal = Size;
  722.   _dpsP[0].val.stringVal = _dps_offset;
  723.   _dps_offset += (_dpsP[0].length + 3) & ~3;
  724.  
  725.   _dpsF.nBytes = _dps_offset+8;
  726.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,112);
  727.   DPSWriteStringChars(_dpsCurCtxt, (char *)Name, _dpsP[0].length);
  728.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[0].length + 3) & 3);
  729. }
  730. #line 110 "DrawingViewWraps.psw"
  731.  
  732.